var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.npc_ChangeController(3004300, "oid=366032", -703, 216, 8, -753, -653, 1, false, 0, false);
            cm.npc_ChangeController(3004327, "oid=366033", 586, 216, 10, 536, 633, 1, false, 0, false);
            cm.npc_ChangeController(3004320, "oid=366034", -53, 216, 6, -103, -35, 4, true, 0, false);
            cm.npc_ChangeController(3004301, "oid=366035", -144, 216, 6, -194, -94, 4, true, 0, false);
            cm.npc_ChangeController(3004302, "oid=366036", -458, 216, 7, -508, -408, 0, false, 0, false);
            cm.npc_ChangeController(3004303, "oid=366037", -520, 216, 7, -570, -470, 0, false, 0, false);
            cm.npc_ChangeController(3004335, "oid=2700210", -338, 213, 7, -388, -288, 1, false, 0, false);
            cm.npc_SetSpecialAction("oid=2700210", "summon", 0, 0);
            cm.npc_SetSpecialAction("oid=2700210", "special2", cm.getQuestStatus(37304) > 0 ? 1 : -1, 1);
            cm.dispose()
        }
    }
};